#import <Cocoa/Cocoa.h>
#import "SolarSeekMessageReader.h"
#import "SolarSeekMessageWriter.h"
#import "MuseekMessage.h"
#import "SolarSeekStore.h"

@interface SolarSeekConnection : NSObject {
  bool started;
  SolarSeekMessageReader *input;
  SolarSeekMessageWriter *output;
  UInt32 totalTickets;
}
@property (readonly) SolarSeekMessageReader *input;
@property (readonly) SolarSeekMessageWriter *output;
@property (readonly) SolarSeekStore *store;

-(void) closeStreams;
-(void) openStreams:(id)unused;
-(void) start;
-(id) init;
-(void) handleMessage:(MuseekMessage *)message;
-(void) messageSent:(MuseekMessage *)message;
-(void) search:(NSString *)term;
-(void) downloadFile:(Result *)file;

@end
